struct VertexToPixel
{
    float4 Position     : POSITION;
	float2 TexCoords	: TEXCOORD0;
};

struct PixelToFrame
{
	float4 Color : COLOR0;
};

float4x4 xViewProjection;
Texture xTexture;

sampler TextureSampler = sampler_state { texture = <xTexture> ; magfilter = LINEAR; minfilter = LINEAR; mipfilter=LINEAR;};

VertexToPixel VS( float4 inPos : POSITION, float2 inTexCoords : TEXCOORD0)
{
    VertexToPixel Output = (VertexToPixel)0;
    
    Output.Position = mul(inPos, xViewProjection);
	Output.TexCoords = inTexCoords;
    
    return Output;    
}

PixelToFrame PS(VertexToPixel PSIn)
{
     PixelToFrame Output = (PixelToFrame)0;
     Output.Color.rgba = tex2D(TextureSampler, PSIn.TexCoords) + Output.Color.rgba;
     return Output;
}

technique Walls
{
    pass Pass0
    { 	
        VertexShader = compile vs_3_0 VS();
        PixelShader = compile ps_3_0 PS();
    }
}